<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Your First Rendering</title>
 
<script type="text/javascript" src="rendering1.js"></script>
 
 <script type="text/javascript">
 
// WebGL rendering context
var gl = null;

function draw() {

	renderTriangle(gl);
}

function start() {

	var canvas = document.getElementById("canvas");

	// Initialize the OpenGL rendering context
	gl = canvas.getContext("experimental-webgl");
	   
	// Only continue if WebGL is available and working
	if (gl)  {
		
		// initialize shader programs 
		initShaders(gl);
		
		// initialize a very simple scene, a triangle
		initBuffers(gl);
	
		// call the draw() function every 20 milliseconds
		setInterval(draw, 20);	
	}
	else {
		alert("WebGL initialization failed! Your browser does not support WebGL or it is not properly configured.");	
	}		
}
</script>

</head>
<body onload="start()"> 
	<center>
	<canvas id="canvas" width="800" height="600">
		If you are seeing this message your web browser does not support the HTML5 &lt;canvas>&gt; element.
	</canvas>
	</center>
</body>
</html>